package com.company.nuwa.common.utils;

/**
 * <p></p>
 *
 * @author Lionel Lee
 * @version 1.0: RedisUtils.java
 * @date 2021/5/30 5:52 下午
 */
public class RedisUtils {

    public  static <T> T getValueObject(Object valueObj, Class<T> clazz) {
            if (clazz.isInstance(valueObj)) {
                return (T) valueObj;
            } else if (clazz == Long.class && valueObj instanceof Integer) {
                Integer obj = (Integer) valueObj;
                return (T) Long.valueOf(obj.longValue());
            }
            return null;
        }

}
